From 7d596f5ad70969d8171e1eb5b7a39d0dc6c11dc2 Mon Sep 17 00:00:00 2001 From: Brendan Gregg Date: Wed, 25 Nov 2015 11:12:55 +0100 Subject: [PATCH] x86/VPMU: return correct fixed PMC count Fixes a register typo. Signed-off-by: Brendan Gregg Reviewed-by: Dietmar Hahn Reviewed-by: Jan Beulich --- xen/arch/x86/cpu/vpmu_intel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c index 12f80aeb70..d5ea7fe2a3 100644 --- a/xen/arch/x86/cpu/vpmu_intel.c +++ b/xen/arch/x86/cpu/vpmu_intel.c @@ -166,10 +166,9 @@ static int core2_get_arch_pmc_count(void) */ static int core2_get_fixed_pmc_count(void) { - u32 eax; + u32 edx = cpuid_edx(0xa); - eax = cpuid_eax(0xa); - return MASK_EXTR(eax, PMU_FIXED_NR_MASK); + return MASK_EXTR(edx, PMU_FIXED_NR_MASK); } /* edx bits 5-12: Bit width of fixed-function performance counters */ -- 2.30.2